#ifndef __TASK_FP_H__
#define __TASK_FP_H__

#define FP_DEVICE RS232_DEVICE_3

typedef enum{
	DSPCMD_KEYS_RECEIVED=0X11,
	DSPCMD_FP_SEND=0X22,	
	DSPCMD_SN_SEND=0X23,	
}FP_CMD_E;

#define FP_SN_MAX 20
#define FP_KEY_LEN 4
#define SEG_LEN 4

typedef struct{
	uint8_t sn[FP_SN_MAX];
	uint8_t rkey;
}KEY_RAW_T;

typedef enum{
	KC_LEFT,
	KC_DOWN,
	KC_UP,
	KC_RIGHT,
	KC_BUTT,
}KEY_CODE_E;

typedef enum{
	KS_DOWN,
	KS_REPEAT,
	KS_UP,
	KS_IDLE,
}KEY_STATUS_E;

typedef struct{
	KEY_CODE_E value;
	KEY_STATUS_E status;
}KEY_T;

typedef struct{
	uint8_t sn[FP_SN_MAX];
}YTDSP_INFO_T;
extern YTDSP_INFO_T g_ytdsp_info;

extern void task_fp_init(void);
extern void task_fp_process(void *pdata);
extern void task_fp_update(void *pdata);
void fp_info_printf(void);

void sem_fp_pend(void);
void sem_fp_post(void);

#ifdef TEST_ENABLE
void task_fp_test(void);
#endif

#endif

